import request from '@/utils/request';

// 主站修改密码
export async function theMainUpdatePossword(data) {
  const res = await request.post(
    '/api/system/user/theMainUpdatePossword',
    data
  );
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}

// 站点修改密码
export async function subordinateUpdatePossword(data) {
  const res = await request.post(
    '/api/system/user/subordinateUpdatePossword',
    data
  );
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
